﻿<phone:PhoneApplicationPage 
    x:Class="LinkED_WP.TouchPad"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:Silverlight4="clr-namespace:MultiTouch.Behaviors.Silverlight4;assembly=MultiTouch.Behaviors.Silverlight.WP71"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    SupportedOrientations="PortraitOrLandscape"
    shell:SystemTray.IsVisible="True">
    
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="10*"/>
            <RowDefinition Height ="Auto"/>
        </Grid.RowDefinitions>

        <Border x:Name="mytouchborder" BorderBrush="{StaticResource PhoneAccentBrush}" 
                BorderThickness="10" 
                Margin="5" Grid.Row="0" 
                Background="{StaticResource PhoneBackgroundBrush}"
                ManipulationStarted="Border_ManipulationStarted"
                ManipulationDelta="Border_ManipulationDelta"
                ManipulationCompleted="Border_ManipulationCompleted" 
                Tap="mytouchborder_Tap" DoubleTap="mytouchborder_DoubleTap"
                Hold="mytouchborder_Hold">

            <Canvas x:Name="mycanvas" Height="Auto" Width="Auto"
                    HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                
                <Path Name="trackpoint1"
                  Visibility="Collapsed"
                  Fill="Red" >
                    <Path.Data>
                        <EllipseGeometry x:Name="ellipseGeo1"
                                     RadiusX="30"
                                     RadiusY="30" />
                    </Path.Data>
                </Path>
                
                <Path Name="trackpoint2"
                  Visibility="Collapsed"
                  Fill="Green" >
                    <Path.Data>
                        <EllipseGeometry x:Name="ellipseGeo2"
                                     RadiusX="30"
                                     RadiusY="30" />
                    </Path.Data>
                </Path>

                <Path Name="trackpoint3"
                  Visibility="Collapsed"
                  Fill="Blue">
                    <Path.Data>
                        <EllipseGeometry x:Name="ellipseGeo3"
                                     RadiusX="30"
                                     RadiusY="30" />
                    </Path.Data>
                </Path>
            </Canvas>
            
        </Border>
        
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Button x:Name="btn1" Content="开始" Grid.Column="0" 
                    BorderThickness="0"
                    HorizontalAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Click="btn_Click"/>

            <Button x:Name="btn2" Content="桌面" Grid.Column="1" 
                    BorderThickness="0"
                    HorizontalAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Click="btn_Click"/>

            <Button x:Name="btn3" Content="计算机" Grid.Column="2" 
                    BorderThickness="0"
                    HorizontalAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Click="btn_Click"/>

            <Button x:Name="btn4" Content="更多" Grid.Column="3" 
                    BorderThickness="0"
                    HorizontalAlignment="Stretch"
                    VerticalContentAlignment="Stretch"
                    Click="btn_Click"/>
        </Grid>
        
    </Grid>
</phone:PhoneApplicationPage>
